Skip to main content

Partner OVD Integration API

The following document highlights the details of the Partner OVD Integration API.

API Description

Objective

The Partner OVD Integration API accepts the front and back side images of an officially valid document (OVD) as the input and performs the following actions:

  1. Optical character recognition on the image with the front side of the document.
  2. Optical character recognition on the image with the back side of the document.
  3. A government database check based on the document type.
  4. A name match between the name extracted from the OCR and the name extracted from the government database.
InputOutput
The images of both the sides of an officially valid document and its typeOCR results for front and back sides, government database check results, and name match verification

API URL

https://ind-engine.thomas.hyperverge.co/v1/ovd_verification

API Endpoint

ovd_verification

Overview

The Partner OVD Integration API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format, and you should upload all images and files as form-data through a POST request.

Method - POST

Authentication

You need a unique pair of application ID ( appId ) and application key ( appKey ) from HyperVerge to verify your identity for accessing the Partner OVD Integration API.

Headers

HeaderMandatory / OptionalDescriptionInput Format
content-type MandatoryThis parameter defines the media type for the request payloadmultipart/form-data
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tabThis should be a unique value
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tabThis should be a unique value
transactionIdMandatoryUnique ID for the customer journeyAny defined unique value mapped to a transaction in your business ecosystem

Inputs

The following table provides the details of the parameters required for the Partner OVD Integration API's request body:

ParameterMandatory / OptionalTypeDescriptionInput FormatDefault Value
frontMandatoryfileThe image of the document capturing the frontside of OVDImage file (JPEG, JPG, or PNG)Not Applicable
backMandatoryfileThe image of the document capturing the backside of OVDImage file (JPEG, JPG, or PNG)Not Applicable
documentIdMandatorystringThe type of the officially valid document. It accepts any one of the following values:
ValueDescription
idAadhaar
voteridVoterId
passportPassport
dlDriving License
id, voterid, passport, dlNot Applicable

Request

The following code snippet demonstrates a standard curl request for the Partner OVD Integration API:

curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/ovd_verification' \
--header 'appid: <Enter_the_appId-Shared-by-HyperVerge>' \
--header 'appkey: <Enter_the_appKey-shared-by-HyperVerge>' \
--header 'transactionId : <Enter_the_Transaction_ID>' \
--form 'documentId="dl"' \
--form 'front=@""' \
--form 'back=@""'

Success Response

The following code snippet demonstrates a success response from the Partner OVD Integration API:

{
"statusCode": 200,
"metaData": {
"requestId": "",
"transactionId": ""
},
"application_status": "auto_approved",
"result": {
"details": {
"front": <Front OCR response>,
"back": <Back OCR response>,
"dbCheck": <DB Check response>,
"nameMatch": <Name match response>
}
}
}

Success Response Details

The following table outlines the details of the success response from the Partner OVD Integration API:

ParameterTypeDescription
statusCodeintegerThe HTTP status code for the response
metaDataobjectThe JSON object containing request and transaction identifiers
application_statusstringThe status of the application processing
resultobjectThe JSON object containing the verification details
frontobjectIt reflects the fields extracted by the OCR for the front side of the document
backobjectIt reflects the fields extracted by the OCR for the back side of the document
dbCheckobjectIf the Partner OVD Integration API finds a matching document in the government database, it extracts and returns all the details from the database. Otherwise, it returns a failure status.
info
This field is not applicable when the OVD input is an Aadhaar. This works only for,
  • Driving License - when the date of birth and the driving license number is extracted succcessfully by the OCR.
  • Voter ID - when the voter ID number is extracted succcessfully by the OCR.
nameMatchobjectThis object in the response contains the value 'true' when the name extracted from the input document in the request matches the one extracted from the government database.
info
If the dbCheck returns a failure, this name match action is not executed.

Failure Response

The following code snippet demonstrates a failure response from the Partner OVD Integration API:

{
"status": "failure",
"statusCode": 400,
"message": "Input Validation Error: requires property \"back\""
}

Error Responses

The following are some error responses from the Partner OVD Integration API:

{
"message": "Input Validation Error: requires property \"back\"",
"statusCode": 400,
"status": "failure"
}

Error Response Details

A failure or error response contains a failure status with a relevant status code and error message.
The following table lists all error responses:

Status CodeError MessageError DescriptionError Resolution
400Input Validation Error: requires property "back"The request is missing an input for the back parameterEnsure the request includes the back parameter with a valid image file
401Missing/Invalid credentialsThe request is either missing the mandatory appId and appKey combination or has invalid valuesVerify and provide valid appId and appKey credentials
429Rate limit exceededThis error is returned when the number of transactions per minute has crossed the limit set for your credentialsRetry the request after some time or contact the HyperVerge team if the issue persists
500Internal Server ErrorKindly check the request headers or contact the HyperVerge team for resolution.Check the request headers or contact the HyperVerge team for resolution
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: